package cn.itcast.webservice;

import javax.jws.WebService;
import javax.xml.ws.Endpoint;

/**
 * 自定义WebService，原生jdk定义
 * Created by jia on 2018/4/11.
 */
@WebService//静态的方法默认是不发布的
public class MyWebService {
    public String hello(String name){
        return name+"你好！";
    }

    public static void main(String[] args) {
        String addr = "http://localhost:12345/ws";
        String addr1 = "http://localhost:12345/ws1";
        //创建服务端点
        Endpoint.publish(addr,new MyWebService());
        Endpoint.publish(addr1,new MyWebService());
    }
}
